package com.kuang.pojo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.lang.Nullable;

import javax.annotation.Resource;

public class Persion {

    @Resource(name = "cat1")
    private Cat cat;

    @Resource
    private Dog dog;

    private String name;

    @Override
    public String toString() {
        return "Persion{" +
                "cat=" + cat +
                ", dog=" + dog +
                ", name='" + name + '\'' +
                '}';
    }

    public Cat getCat() {
        return cat;
    }

    public Dog getDog() {
        return dog;
    }

    public String getName() {
        return name;
    }

    public Persion() {
    }

    public Persion(Cat cat, Dog dog,  String name) {
        this.cat = cat;
        this.dog = dog;
        this.name = name;
    }
}
